package com.springboot.model.validator;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author: TongRui乀
 * @Date: 2020-04-13 9:34
 * @description：
 */
@Data
public class ValidatorDto {


    @NotBlank(message = "Create-名称不能为空", groups = CreateValidator.class)
    @NotBlank(message = "Update-名称不能为空", groups = UpdateValidator.class)
    private String name;

    @NotBlank(message = "Create-mobile不能为空", groups = CreateValidator.class)
    @NotBlank(message = "Query-mobile不能为空", groups = QueryValidator.class)
    private String mobile;

    @NotBlank(message = "Create-email不能为空", groups = CreateValidator.class)
    @NotBlank(message = "Update-email不能为空", groups = UpdateValidator.class)
    private String email;

    @NotNull(message = "Create-age不能为空", groups = CreateValidator.class)
    @NotNull(message = "Update-age不能为空", groups = UpdateValidator.class)
    private Integer age;

    @IdCard(message = "身份证号不正确", groups = CreateValidator.class)
    private String idCard;

}
